package com.gof.example.observer;

/**
 * Created with IntelliJ IDEA.
 * Created by zhiyuan on 2018/5/12 19:32.
 * haiming.fei@tongdun.cn
 */
public class Investor extends Observer {

    private double currentPrice;
    private String fullName;

    public Investor(String fullName) {
        this.fullName = fullName;
    }

    @Override
    void update(double price) {
        currentPrice = price;
        System.out.println("通知了["+fullName+"], currentPrice: " + currentPrice);
    }
}
